package com.sts.transform.function;

import cn.hutool.core.util.IdUtil;
import com.googlecode.aviator.runtime.function.AbstractFunction;
import com.googlecode.aviator.runtime.type.AviatorObject;
import com.googlecode.aviator.runtime.type.AviatorString;

import java.util.Map;

/**
 * @author lsl
 * @since 2025年07月09日 19:58
 */
public class UUIDFunction extends AbstractFunction {

    @Override
    public AviatorObject call(Map<String, Object> env) {
        return new AviatorString(IdUtil.fastUUID());
    }

    @Override
    public String getName() {
        return "uuid";
    }
}
